Subject: [PATCH] Fixed OFoptional by introducing OFalign?
--- a/CMake/osconfig.h.in
+++ b/CMake/osconfig.h.in
-@@ -1165,4 +1165,7 @@
- /* Define if the compiler supports __declspec(align) */
- #cmakedefine HAVE_DECLSPEC_ALIGN
+@@ -1162,4 +1162,7 @@
+ /* Define if we are supposed to use STL's system_error */
+ #cmakedefine HAVE_STL_SYSTEM_ERROR @HAVE_STL_SYSTEM_ERROR@
+/* Define if the compiler supports __declspec(align) */
+#cmakedefine HAVE_DECLSPEC_ALIGN
#endif /* !OSCONFIG_H*/
--- a/config/aclocal.m4
+++ b/config/aclocal.m4
-@@ -1963,6 +1963,47 @@
+@@ -1922,6 +1922,47 @@
fi
])
dnl This macro checks if a given preprocessor symbol exists and is a string
--- a/config/configure
+++ b/config/configure
-@@ -16771,6 +16771,66 @@
- fi
-
+@@ -16711,6 +16711,66 @@
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __alignof__" >&5
+$as_echo_n "checking for __alignof__... " >&6; }
--- a/ofstd/tests/toption.cc
+++ b/ofstd/tests/toption.cc
-@@ -43,6 +43,11 @@
- COUT << OFalignof(OFoptional<float>) << ' ' << sizeof(OFoptional<float>) << OFendl;
- COUT << OFalignof(long) << ' ' << sizeof(long) << ' ' << OFalignof(OFoptional<long>) << ' ' << sizeof(OFoptional<long>) << OFendl;
+@@ -38,6 +38,11 @@
+
+ OFoptional<int> o0( 3 ), o1, o2( OFnullopt );
+ COUT << OFalignof(OFoptional<char>) << ' ' << sizeof(OFoptional<char>) << OFendl;
+ COUT << OFalignof(OFoptional<short>) << ' ' << sizeof(OFoptional<short>) << OFendl;